<!--
  @author chongw
  @since 2021/05/27
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<style>
    body .demo-class .layui-layer-btn .layui-layer-btn0{background:#1AA094;}
</style>
<body>

<!--页面顶层div-->
<div class="layui-fluid">

    <div class="layui-card">

        <div class="layui-card-body">

            <div class="layui-tab-content">
                <form class="layui-form" action="" lay-filter="zmn-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label">对象部门：</label>
                        <div class="layui-input-block">
                            <input type="hidden" name="thresholdId" th:value="${rule.thresholdId}" />
                            <div class="layui-form-mid layui-word-aux" th:text="${rule.data.deptName}"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">对象名称：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux" th:text="${rule.data.objMasterName}"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">一级预警：</label>
                            <div class="layui-form-mid" style="width: 40px;text-align: center;">&gt;=</div>
                            <div class="layui-input-inline">
                                <div style="position: relative;">
                                    <input type="text" name="value1" lay-verify="required|integer"
                                       autocomplete="off" placeholder="请输入一级预警值"
                                           style="padding-right: 32px;"
                                       class="layui-input layui-input-number" th:value="${rule.rule1.value}"/>
                                    <span style="position: absolute;right: 15px;top:5px;color: #ddd;">%</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">二级预警：</label>
                            <div class="layui-form-mid" style="width: 40px;text-align: center;">&lt;</div>
                            <div class="layui-input-inline">
                                <div style="position: relative;">
                                    <input type="text" name="value2" lay-verify="required|integer"
                                           autocomplete="off" placeholder="请输入二级预警值"
                                           style="padding-right: 32px;"
                                           class="layui-input layui-input-number" th:value="${rule.rule2.value}"/>
                                    <span style="position: absolute;right: 15px;top:5px;color: #ddd;">%</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-required">三级预警：</label>
                            <div class="layui-form-mid" style="width: 40px;text-align: center;">&lt;</div>
                            <div class="layui-input-inline">
                                <div style="position: relative;">
                                    <input type="text" name="value3" lay-verify="required|integer"
                                       autocomplete="off" placeholder="请输入三级预警值"
                                           style="padding-right: 32px;"
                                       class="layui-input layui-input-number" th:value="${rule.rule3.value}"/>
                                    <span style="position: absolute;right: 15px;top:5px;color: #ddd;">%</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary" onclick="cancel()">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--主js代码置于html外-->
<script type="text/javascript" th:inline="javascript">
    // js参数传值变量统一命名为json
    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        brs_objective_rule_detail: "objective/rule/zmn.objective.rule.edit"
    }).use(['index', 'brs_objective_rule_detail']);

</script>
</body>
</html>
